import request from '@/commons/request'

export function getFoods (food, page, limit) {
  return request({
    url: '/food/getFoods',
    method: 'get',
    params: {food, 'page': page, 'limit': limit}
  })
}

export function addFood (food) {
  return request({
    url: '/food/addFood',
    method: 'post',
    data: food
  })
}

export function updateFood (food) {
  return request({
    url: '/food/updateFood',
    method: 'put',
    data: food
  })
}
